package com.sxau.software_educational_system_backend.common;

/**
 * 错误码
 *
 */
public enum ErrorCode {

    SUCCESS(200, "success", ""),
    PARAMS_ERROR(401, "未登录/token失效", ""),
    NOT_EXIT(402, "用户不存在", ""),
    NULL_ERROR(403, "权限不足", ""),
    NOT_LOGIN(404, "未获取资源", ""),
    PASSWORD_ERROR(405,"密码错误",""),
    ACCOUNT_CANCEL(406,"账号被注销",""),
    UPLOAD_FAILED(407,"文件上传失败",""),
    SAVE_FAILED(408,"文件存储失败",""),
    DELETE_FAILED(409,"文件删除失败",""),
    FILE_NOT_FOUND(410,"文件不能为空",""),

    SYSTEM_ERROR(500, "系统内部异常", "");

    private final int code;

    /**
     * 状态码信息
     */
    private final String message;

    /**
     * 状态码描述（详情）
     */
    private final String description;

    ErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public String getDescription() {
        return description;
    }
}
